package com.wuyu;

import com.wuyu.mini.spring.annotation.MiniAspect;
import com.wuyu.mini.spring.annotation.MiniOrder;
import com.wuyu.mini.spring.aop.aspect.MiniDefaultAspect;

import java.lang.reflect.Method;

@MiniAspect(pointcut = "execution(public * com.wuyu..*.*(..))")
@MiniOrder(value = 0)
public class AccessAspect extends MiniDefaultAspect {
    @Override
    public void before(Class<?> targetClass, Method method, Object[] args) throws Throwable {
        System.out.println("进入");
    }

    @Override
    public Object afterReturning(Class<?> targetClass, Method method, Object[] args, Object returnValue) throws Throwable {
        System.out.println("出去");
        return returnValue;
    }
}
